import Vue from 'vue'
import Router from 'vue-router'
import Login from "../views/Login"
import index from '../views/index'
import test2 from "../views/test2";
import test1 from "../views/test1";
import test3 from "../views/test3";
import registerinfo from "../views/registerinfo";
import updateInfo from "../views/updateInfo";

Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    // 登录页
    {
      path: '/',
      name: 'Login',
      component: Login
    },
    // 注册页
    {
      path: '/registerinfo',
      name: 'registerinfo',
      component: registerinfo
    },
    {
      path: '/updateInfo',
      name: 'updateInfo',
      component: updateInfo
    },
    //首页
    {
      path: '/index',
      name: 'index',
      component: index,
      meta: {
        showFooter: true
      },
      children: [
        {
          path: '/test/test1/',
          name: 'test1',
          component: test1,
          meta: {
            showFooter: false
          }
        },
        {
          path: '/test/test2/',
          name: 'test2',
          component: test2,
          meta: {
            showFooter: false
          }
        },
        {
          path: '/test/test3/',
          name: 'test3',
          component: test3,
          meta: {
            showFooter: false
          }
        }
      ]
    }
  ]
})
